﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Skala.master" AutoEventWireup="true" CodeFile="YeniUye.aspx.cs" Inherits="YeniUye" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
  
    <script>
        function ShowProgress() {
            setTimeout(function () {
                var modal = $('<div />');
                modal.addClass("modal");
                $('body').append(modal);
                var loading = $(".loading");
                loading.show();
                var top = Math.max($(window).height() / 2 - loading[0].offsetHeight / 2, 0);
                var left = Math.max($(window).width() / 2 - loading[0].offsetWidth / 2, 0);
                loading.css({ top: top, left: left });
            }, 200);
        }
        //$('form').live("submit", function () {
        //    ShowProgress();
        //});

        $(document).ready(function () {
            $('#' + '<%= txtSoyad.ClientID  %>').val('');
            $('#' + '<%= txtSifre.ClientID  %>').val('');


        });
        $(document).ready(function () {
            var hesabim = Sys.WebForms.PageRequestManager.getInstance();  
            hesabim.add_endRequest(function () {

                $('#' + '<%= txtSoyad.ClientID  %>').val('');
                $('#' + '<%= txtSifre.ClientID  %>').val('');

                function ShowProgress() {
                    setTimeout(function () {
                        var modal = $('<div />');
                        modal.addClass("modal");
                        $('body').append(modal);
                        var loading = $(".loading");
                        loading.show();
                        var top = Math.max($(window).height() / 2 - loading[0].offsetHeight / 2, 0);
                        var left = Math.max($(window).width() / 2 - loading[0].offsetWidth / 2, 0);
                        loading.css({ top: top, left: left });
                    }, 200);
                }
                $('form').live("submit", function () {
                    ShowProgress();
                });
            });
        }); 
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<div id="uye-girisi-kapsam">
    <div id="signupbox" class="mainbox col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
      <div class="panel panel-info">
        <div class="panel-heading">
          <div class="panel-title"><asp:Label ID="lblUyeGuncelle" runat="server" /></div>
          <div style="float:right; font-size: 85%; position: relative; top:-10px"></div>
        </div>
        <div class="panel-body" >
          <div id="signupform" class="form-horizontal" >
              <asp:UpdatePanel runat="server" id="up1">
                <ContentTemplate>
            <div id="signupalert" style="display:none" class="alert alert-danger" runat="server">
              <p>Error:</p>
              <span></span> </div>
            <div class="form-group">
              <label for="email" class="col-md-3 control-label"><asp:Label ID="lblHesapEposta" runat="server" /></label>
              <div class="col-md-9">
                 
                <asp:TextBox ID="txtMail" runat="server"  AutoPostBack="true" CssClass="form-control" placeholder="E-posta Adresiniz" OnTextChanged="txtMail_TextChanged" ></asp:TextBox>
                    <div runat="server" id="UserAvailability" class="alert alert-danger" style="display:none"></div>
                    <asp:RequiredFieldValidator ID="valMail" CssClass="alert-danger" runat="server" ControlToValidate="txtMail" ErrorMessage=" * EPosta alanı boş geçemezsiniz" Display="Dynamic"></asp:RequiredFieldValidator>
                    <%--<asp:RegularExpressionValidator ID="valMail2" CssClass="alert-danger" runat="server" ControlToValidate="txtMail" ErrorMessage="* Yanlış EPosta formatı" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>--%>
              </div>
            </div>
              </ContentTemplate>
                </asp:UpdatePanel>
            <div class="form-group">
              <label for="firstname" class="col-md-3 control-label"><asp:Label ID="lblHesapAdiniz" runat="server" /></label>
              <div class="col-md-9">
                   <asp:TextBox ID="txtAd" runat="server" CssClass="form-control" placeholder="Adınız"></asp:TextBox>               
                  <asp:RequiredFieldValidator ID="valAd" CssClass="alert-danger" runat="server" ControlToValidate="txtAd" ErrorMessage=" * İsim alanını boş geçemezsiniz" Display="Dynamic"></asp:RequiredFieldValidator>
              </div>
            </div>
            <div class="form-group">
              <label for="lastname" class="col-md-3 control-label"><asp:Label ID="lblHesapSoyadiniz" runat="server" /></label>
              <div class="col-md-9">
                  <asp:TextBox ID="txtSoyad" runat="server" CssClass="form-control" placeholder="Soyadınız"></asp:TextBox>
              </div>
            </div>
            <!--CİNSİYET-->
            <div class="panel" style="margin:0 0 0 106px;">
              <div class="panel-heading" style="padding:0;">
                <h3 class="panel-title" style="margin: 0 0 0 12px;"><asp:Label ID="lblHesapCinsiyetiniz" runat="server" />  </h3>
              </div>
              <div class="panel-body" style="padding:12px;"> 
                    
                    <asp:RadioButtonList ID="rbCinsiyet" runat="server" Width="171px" CssClass="list-group-item">
                        <asp:ListItem Selected="True">Erkek</asp:ListItem>
                        <asp:ListItem>Bayan</asp:ListItem>
                    </asp:RadioButtonList>                     
              </div>
            </div>
            <!--//CİNSİYET-->
            <div class="form-group">
              <label for="password" class="col-md-3 control-label"><asp:Label ID="lblHesapSifre" runat="server" /></label>
              <div class="col-md-9">
                  <asp:TextBox ID="txtSifre" runat="server" TextMode="Password" CssClass="form-control"  placeholder="Şifreniz"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="valSifre" CssClass="alert-danger" Display="Dynamic" runat="server" ControlToValidate="txtSifre" ErrorMessage="*Şifre alanını boş geçemezsiniz"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="valSifre2" CssClass="alert-danger" Display="Dynamic" runat="server" ControlToValidate="txtSifre" ErrorMessage="Şifre en az 6 hane olmalı" ValidationExpression="[a-z,A-Z,0-9]{6,}"></asp:RegularExpressionValidator>

              </div>
            </div>
            <div class="form-group">
              <label for="password" class="col-md-3 control-label"><asp:Label ID="lblSifreTekrar" runat="server" /></label>
              <div class="col-md-9">
                    <asp:TextBox ID="txtSifreTekrar" runat="server" TextMode="Password" CssClass="form-control"  placeholder="Şifrenizi Tekrar Giriniz"></asp:TextBox>
                    <asp:CompareValidator ID="compSifre" runat="server" CssClass="alert-danger" Display="Dynamic" ControlToCompare="txtSifre" ControlToValidate="txtSifreTekrar" ErrorMessage="Şifreler uyuşmuyor"></asp:CompareValidator>

              </div>
            </div>
            <div class="input-group">
              <div class="checkbox" style="margin: 0 0 3px 124px;">
                <label>
                  <asp:CheckBox ID="cbTumKampanya" runat="server" Text="" TextAlign="Right" />
                  </label>
              </div>
            </div>
            <div class="form-group"> 
              <!-- Button -->
              <div class="col-md-offset-3 col-md-9">
                  <asp:Button ID="btnKaydet" runat="server" OnClick="btnKaydet_Click" Text="Kaydet" class="btn btn-info"/><i class="icon-hand-right"></i>
                
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
</div>
    <asp:HiddenField runat="server" ID="hidAvailable" Value="0" />
   <div class="loading" align="center">
    Lütfen bekleyin..<br />
    <br />
    <img src="img/loader.gif" alt="" />
</div>
</asp:Content>

